
#ifndef __KEYPAIR_H
#define __KEYPAIR_H

#include "../iface/CryptInterface.h"

#define RANDOMSIZE 4096

#define KEY_BITS 2048

class KeyPair
{
   public:
      virtual ~KeyPair() {}
      virtual CRYPT_CONTEXT GetCryptContext_PublicKey(const char *name);
      virtual CRYPT_CONTEXT GetCryptContext_PrivateKey(const char *name);
      CRYPT_CERTIFICATE GetCertificate_PublicKey(const char *name);
      void SelfSignCert(CRYPT_CERTIFICATE cert, const char *name);
      char *ExportCertificateToText(CRYPT_CERTIFICATE cert);
      void GetEntropySource();
      virtual char *ExportPrivateKey();
      virtual char *ExportPasswordedPrivateKey(const char *password);
      virtual int ImportPrivateKey(const char *encoded);
      virtual int ImportPasswordedPrivateKey(const char *password, const char *encoded);
      virtual char *ExportPublicKey();
      virtual int ImportPublicKey(const char *encoded);
      virtual const char *GetKeyTypeName();
      virtual char *GetMD5KeyFingerprint();
};

#endif
